import request from '@/utils/request'

// 获取用户列表接口
export function getUsersApi(pageNum, pageSize, username) {
    return request({
        url: '/sys/product/user',
        method: 'get',
        params: { pageNum, pageSize, username }
    })
}
// 删除用户
export function delUsersApi(id) {
    return request({
        url: `/sys/product/user/${id}`,
        method: 'delete',
    })
}
// 添加用户
export function addUsersApi(data) {
    return request({
        url: `/sys/product/user`,
        method: 'post',
        data
    })
}
// 编辑用户
export function editUsersApi(id,data) {
    return request({
        url: `/sys/product/user/${id}`,
        method: 'put',
        data
    })
}